package cn.bandeqing.workerWalletRecord.entity;

import cn.bandeqing.finance.req.AccountWorkerWithdrawReq;
import cn.bandeqing.finance.req.CheckWorkerWithdrawReq;
import cn.bandeqing.finance.req.FinanceWorkerWalletChangeReq;
import cn.bandeqing.frame.mybatis.config.InsertOrUpdateListener;
import cn.bandeqing.frame.mybatis.entity.BaseEntity;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.sql.Timestamp;

/**
 * 钱包流水 实体类。
 *
 * @author fugui
 * @since 2024-01-24
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "bdq_worker_wallet_record", onInsert = InsertOrUpdateListener.class, onUpdate = InsertOrUpdateListener.class)
@AutoMappers({
        @AutoMapper(target = FinanceWorkerWalletChangeReq.class, convertGenerate = false),
        @AutoMapper(target = CheckWorkerWithdrawReq.class, convertGenerate = false),
        @AutoMapper(target = AccountWorkerWithdrawReq.class, convertGenerate = false)
})

public class WorkerWalletRecord extends BaseEntity {

    @Id(keyType = KeyType.Auto)
    private Long wwrId;

    private Long workerId;

    private String workerNickName;

    private Long orderId;

    private WwrType wwrType;

    private String wwrDesc;

    private Double beforeMoney;

    private Double changeMoney;

    private Double afterMoney;

    private Long ocId;

    private WwrStatus wwrStatus;

    private Timestamp accountTime;
    private AccountType accountType;
    private String accountUserName;
    private Long accountUserId;
    private String accountRemark;

    private String passUserName;
    private Long passUserId;
    private Timestamp passTime;
    private String passRemark;

    private String rejectUserName;
    private Long rejectUserId;
    private Timestamp rejectTime;
    private String rejectRemark;


}
